Add threat model + security-model discoverability (AGENTS.md -> SECURITY.md -> THREAT_MODEL.md)#17823
Add threat model + security-model discoverability (AGENTS.md -> SECURITY.md -> THREAT_MODEL.md)#17823potiuk wants to merge 4 commits into
Conversation
…ITY.md -> THREAT_MODEL.md) Generated-by: Claude Code
Generated-by: Claude Code
|
Heads-up on the red Simple (17) check: it's failing at the |
|
Thanks for preparing this. Speaking as an IoTDB PMC member, I think this is a useful v0 draft and a good starting point for the PMC to own and refine. I agree with the approach of keeping inferred claims explicit and promoting them as the PMC confirms or corrects them. A few points I can confirm or suggest clarifying from the current project behavior/configuration:
For inter-node trust, Byzantine peer assumptions, and the exact wording of the long-term triage policy, I think it is reasonable to keep them as explicit open questions and settle them through follow-up PMC discussion rather than trying to finalize the whole threat model in this PR. So overall: I support using this PR as the initial draft, with the current defaults and privilege model above folded into the document where appropriate. |
Generated-by: Claude Code
|
Thanks @HTHou — pushed a revision folding in your review:
Per your note, I kept inter-node trust, the Byzantine-peer assumption, and the long-term triage policy as explicit §14 follow-up items rather than finalizing them here. Ready as the initial draft whenever you're set. |
JackieTien97
left a comment
There was a problem hiding this comment.
Thanks @potiuk and the ASF Security team for drafting this. The structure and the provenance tagging are genuinely useful. Below are the PMC's confirmations so the corresponding (inferred) tags can be promoted to (maintainer).
Wave 1 — scope & posture
- Deployment posture: Confirmed. IoTDB is intended to be deployed inside a trusted network, behind the application tier; the authenticated client RPC surface is the in-model boundary. We endorse trusted-network-by-default. (§2/§4/§7)
- Default
root:root: It is a documented must-change, the operator's responsibility — not a supported production posture. A report against an unchanged default password isOUT-OF-MODEL: non-default-build. (§5a/§10/§11a) - TsFile / SDK boundary: Confirmed — TsFile findings route to
apache/tsfile; theiotdb-client-*SDKs are out of this batch. (§2/§3)
Wave 2 — boundaries & protocols
- Default-enabled protocols: Only the Thrift session protocol ships enabled. REST (
enable_rest_service=false) and MQTT (enable_mqtt_service=false) are opt-in. (§2/§6) - Inter-node channel: Assumed to run on a trusted network. Note that the ConfigNode↔DataNode and consensus channels currently have no transport encryption. A finding that requires intercepting or modifying inter-node traffic is
OUT-OF-MODEL: adversary-not-in-scopeunder this posture; operators are responsible for network segmentation (§10). (§4/§7/§9) - TLS: Available on the client surface but off by default (
enable_thrift_ssl=false; REST also supports SSL). There is no inter-node TLS today (see #5). (§5a/§9)
Wave 3 — extension execution & adversary
- Extension code execution: Registration is not admin-only —
USE_UDF/USE_TRIGGER/USE_PIPE/USE_MODELare SYSTEM-level privileges that can be GRANTed to non-admin users. We agree that server-side code execution by a principal holding one of these privileges is by-design (BY-DESIGN): grantingUSE_*is equivalent to granting server-side code execution, and operators must treat it as such (§10). A scan reporting "UDF/Trigger/Pipe/Model allows arbitrary code execution" isBY-DESIGN, not a vulnerability. - Cluster Byzantine posture: Cluster membership is assumed fully trusted. IoTDB does not claim Byzantine fault tolerance — no safety/liveness guarantee against an authenticated-but-malicious peer. (§7/§8)
Wave 4 — properties & resource line
- Resource/DoS line: A single expensive query, or a write flood that exhausts CPU/memory/disk, is expected and the operator's capacity-planning problem, not a bug (expected degradation /
OUT-OF-MODEL). This does not waive the §8 property that malformed pre-auth or client input must yield a clean error rather than crash, OOM, or hang the server — that remains in scope andVALID. (§8/§11a) - No additional recurring false positives beyond the §11a seed list at this time.
- Canonical location: Keep the model in-repo as proposed (
AGENTS.md → SECURITY.md → THREAT_MODEL.md); the IoTDB PMC owns revisions. (wave-4 Q11)
One correction to §5 (clock): time-series semantics depend on timestamps, but server-side time ordering does not assume monotonic or synchronized clocks across the cluster. Please update the §5 clock assumption accordingly.
One note on the diff: the ## Security section was added to CLAUDE.md, which is correct — in this repo AGENTS.md is a symlink to CLAUDE.md, so the AGENTS.md → SECURITY.md → THREAT_MODEL.md chain resolves as intended. A one-line note in the PR description about the symlink would save future reviewers a double-take.
With these confirmed, ~9 of the §14 items can move from (inferred) to (maintainer). Happy to iterate on the wording directly on the branch.
|
Thanks @JackieTien97 — exactly the confirmation pass the v0 needed. All eleven points plus the two corrections are folded into the branch; responding individually: Wave 1
Wave 2 Wave 3 Wave 4 Corrections
With your pass and @HTHou's folded in, §2–§13 are PMC-confirmed and §14 is fully resolved — residual (inferred) tags are limited to low-stakes environmental details. Re-requesting your review; happy to iterate on any wording. |
|
|
||
| - "UDF/Trigger/Pipe/Model can run arbitrary code" — by-design server-side execution gated by the grantable `USE_UDF`/`USE_TRIGGER`/`USE_PIPE`/`USE_MODEL` system privileges (§9); the principal holding the grant is trusted for that capability. Not a finding. *(maintainer — HTHou)* | ||
| - "Default password is `root`" — operator must-change-before-production per §5a/§10; `OUT-OF-MODEL: non-default-build`, not a code bug in itself. *(maintainer — HTHou)* | ||
| - "Server reachable on the public internet / no TLS by default on the wire" — operator deployment responsibility (§9/§10); client Thrift SSL is off by default and public exposure is a non-supported posture (§3). *(maintainer — HTHou)* |
There was a problem hiding this comment.
Especially with respect to CRA requirements of deploying "secure per default" this might cause issues in the future, not sure we should exclude it. I would much more be in favor of enabling TLS per default and having users actively disable it.
There was a problem hiding this comment.
Thanks @chrisdutz, that is a fair point, especially from a future CRA / secure-by-default perspective.
One practical question: if IoTDB enables TLS by default, that also means every deployment needs usable certificates/keys or keystore/truststore material at startup. My understanding is that those certificates and private keys should be provided or generated by the operator/deployment environment, not shipped by the IoTDB project itself.
So I wonder what “TLS enabled by default” should mean concretely here:
- should IoTDB fail to start until the operator provides proper TLS material?
- should IoTDB generate a self-signed certificate automatically for first startup?
- or should this be tracked as a future hardening / CRA-readiness item, while the threat model documents the current state: TLS is available but off by default, and operators are responsible for enabling it with their own certificates/keys?
I agree we should not lose the secure-by-default concern. I just want to avoid implying that the project can safely provide universal default certificates/keys, or that enabling TLS without operator-provided trust material gives the intended security property.
What this is
A draft threat model for Apache IoTDB, proposed by the ASF Security team for the IoTDB PMC to review, correct, or reject. It is a starting point for discussion, not a finished document.
This PR:
THREAT_MODEL.md— the draft model, following the ASF Security threat-model rubric;SECURITY.md— a short security policy that links the threat model;## Securitysection to the existingAGENTS.md, so the chainAGENTS.md → SECURITY.md → THREAT_MODEL.mdis mechanically discoverable by automated security scanners.How to read it
Every claim is provenance-tagged:
This v0 is deliberately inferred-heavy (~14 documented / ~41 inferred). The §14 Open questions section collects every inferred claim into four waves for the PMC to confirm or correct — that is where review time is best spent. The highest-impact ones:
root:rootadmin is a supported production posture or a documented must-change (wave 1);Nothing here is a requirement — the model is for the PMC to own. Comment inline, edit the branch directly, or reply on the email thread; we'll fold in your answers and promote the (inferred) tags as they are confirmed.
Note: in
apache/iotdb,AGENTS.mdis a symlink toCLAUDE.md, so the## Securitysection in this PR lands inCLAUDE.mdby design — theAGENTS.md → SECURITY.md → THREAT_MODEL.mddiscoverability chain resolves through the symlink.